<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="org.leon.pojo.Resume" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <title>Login</title>
    <script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript">

    </script>
</head>
<body>
<base href="<%=basePath%>">
<div style="width: 80%; margin:auto;">
    <div>
        <a href="user/logout">退出</a>
    </div>
    <div style="text-align: center;">
        <h1>简历列表</h1>
        <%
            List<Object> list = (ArrayList)request.getAttribute("result");
        %>
        <div>
            <a href="resume/page/edit">新增</a>
        </div>
        <table align="center">
            <thead>
            <tr>
                <td>ID</td>
                <td>Name</td>
                <td>Phone</td>
                <td>Address</td>
                <td>.</td>
            </tr>
            </thead>
            <tbody>
            <%
                for(int i=0;i<list.size();i++){
                Resume resume=(Resume)list.get(i);
            %>
            <tr><td><%=resume.getId() %></td>
                <td><%=resume.getName() %></td>
                <td><%=resume.getPhone() %></td>
                <td><%=resume.getAddress()%></td>
                <td>
                    <a href="resume/page/edit?id=<%=resume.getId()%>">修改</a>
                    <a href="resume/remove/<%=resume.getId()%>">删除</a>
                </td>
            </tr>
           <% } %>

            </tbody>
        </table>
    </div>

</div>

</body>
</html>
